orginazing the js script in a different file