used if else statement to make sure that user enter correct infor with && operator stating that statement 1 and statement 2 is true