refactored examples