maximum height added to calculation
yihaa