Return an array instead of a hash and using flatten method to do so