array #1 working

finally the function works.