refactors custom commands