slight refactoring for testing with a web-page.