basic math functions added to program
Corrections implemented