make a run script command
bit of refactoring