reimplemented catches in calculator