added step type checking