Add option to return and array instead of an object