new calculaterange func