refactoring of step invoker