Tested calculation correctness, modified output