added array function and called it