private method for StackOperator