refactored type parameters into states