listener as main module, moved router to import function