Added yMaxDistance and yMinDistance options