removed while loop from pickup items
added code to remove the item