working on array implemention