added functionality for html snippet