added a dynamic delete function for game inventory