some refactoring for the module actions to keep it DRY