Added IF THEN ELSE statments