adapt to cases