changed how item_id is obtained, should be more reliable now