refactoring priviledged command