docstring and removing variable in get_cost_per_item