add grunt
update tests and fix bugs in calculator