partial implementation of querying
added support for querying within the tag