refactor, MST gen made more selective