need to treat array vs object correctly