calculating portion of costs
rename