move js to seperate file