all cases handled for calculator, bug fixes