printing all elements in a list