moved processfn from command to command.environment and removed processfn at the end of execute if executelevel is 0