MOdified Barrel function in terms of array