better profile handling