use template for float range