first step toward refactoring to use history.js