code to be refactored: clearer output for shopping lists