Added get_cost()