Lift out this logic.