added JS code snippet