changed unit tests to check with objects instead of array