started moving js to seperate file