added a method which returns the list