generalize MIM construct queries
Merge pull request #1 from ariutta/master

generalize MIM construct queries