a program that calculates