extracted js into external js file