added confirm for type changing