add interface for StackMemory