See updated snippet above.