implement tag query on client