view logic for list and item