Calculates heading at perfectly level condition. Added better output.
Modifying for better markdown