UPDATE 10

Edited the calculate() and made some changes.