refactorin hit has commandtype