extracting the individual item logic