revrite process_module in monads way. Everything is broken for now, but process module - works properly
tmp commit