Made user input check its own function