refactor for ItemRepository and added detail