build a nested object beforehand