adapt to type changes