setting up range
testing ranges
Moving range calculating logic to separate toutine