refactor validate mods