added valid-keys? predicate