working on array functions