Updted example JS