fixed get greatest step