removed extra code from controls