add support for filtering keys, implement attributes method