Added support to query for keys