moved router to lib