moved javascript to it's own file