Replace extend with extend-type