updated snippet