Working code to display list