move some module specific logic to the modules