removed ; at the end of if-statement that was giving compiler error