avoid warning by using CGFloat instead of float