theory changes, stack implementation