Added an array function and return array.