result

added correct if statements