export generalized run function