handle the seven cases