break server logic into a module