added functionality to the list class