generate items by function