moved javascript to separate file