Adding complex name querying functionality