add try/catch for input