moving js to it's own file