made some changes to calc