add the part that validate user input