switched IF statement from

single line to curly braced blocks