moved javascript to seperate file
set up seperate javascript file