fixed tag and attribute queries and wrote unit tests