doCapture helper method