moved all js to external file