move to external js