found bugs in printlist method