mixing of this.document and document is a bit odd here