refactored the snippets classes
added more examples to show the  method to display to result