adding JS code snippets