working with objects and arrays of objects