Noticed the output doesnt check if the list is empty.