make sure it works with nested objects