adding additional functions to access the stack for unit tests