Implemented the required "calc" method