returnCommandResult on evaluation of command (refactoring commands to return values)