move js to spereate file