slight refactor for elementquerirs