some code for processing list items