add stacks functionality (useful for keeping the list of recent errors or notices that have occurred)