Mapping logic.