Mappig logic.