sub calculation changes