moved js from template to linked file