update the auto mapping logic.