cleaning up if statements for control points