update the type