updates that snippet
js2r stuff