Changed max to min in Eqn. 4