added some code for picking up loot