change float to cgfloat