added querying stuff
merged