refactor and get_item