move js back to external file