added subscription functionality, started query dispatcher implementation