moving to javascript file