replaced float with CGFLoat