calcfunctions