Refactor room_and_cost method