document hooks