moved inline js to file