avoid inline script
move js code to js file