Made some calculation changes