Returning an array and simplifying