Creating logic to insert items