correctly compare lists as well