moved javascript to seperate file