change float to CGFloat