trying with if and ifs
Assignment 2.2 first try.