added basic support for select queries