more readable util.fix_up_map