Added Array function and loop