advanced calculator, with some math stuff