changes for List and Empty list output, looks like a solution