Refactored
Modfied calc.hs not completed