working on back/forward functionality (trying to preserve page state)