added set-timeout js snippet