finished ageutility getCost()