make height calculation to perfection