Use CGFloat instead of Float to make compiler happy