rm calc function, erroneous