store resource costs as saved variables