Added scripts for calculating the leaning