list comparision working, takes longer time because of collections modue. write direct loop