Implemented if and print statements