created external js file for js methods