abstract query creation and add first concrete impl