Patched from branch core_queries
added the oid_nuts as well