added js snippet