implemented javascripts