User input and casting