Type modification algorithm updated