better handling referenced list comparison