initialize modules
working on the idea of in and out middlewares