removed redundance javascript