adds callback to documentation