refactor itemscontroller