added items loop and logic