make logic dynamicly depending on item type