Second calculate function works.