some changes to cost algorithm
items can now be removed