moved js file into pages