refactoring; Query triple extraction is implemented