fix method returning array of objects instead of array of arrays