add implementation for array list