some hacky stuff for running a single doc