better implementation of buildItemList