return value for add(array) should be an array of objects