creating and editing nested objects