replace list by map in ast