refactoring of command/program semantics