implement calc class