added global window.test for debugging