updated snippet and examples