replace list by map