wrote an array list implementation