Type modification algorithm modified