move router to global var because this isn't javascript