Added constraints to user input