updated so that objects are default unless [] are empty and updated tests to verify it works