remove duplication by using update-in instead of constructing the list again.