added function to compare lists and added each fn