moved javascript to its own file