removed dividing on each read value and now divide only once