refactored search engine, used list to make it more deterministic
Merge branch 'release-3.1.0' into develop