removed some repeated methods in calculate module