added a dynamic array implementation