removed document.register restriction