Added parameter to methods to output array instead of object