basic database querying added