added supports for $keys in the query methods