working Main.js
code added for final leap calc