changed how to solve to how to calculate it