added end javascripts back