added printList method