added new stack implementation
added new memoryStack, not tested