implementation of the list() changed to the ArrayList