move capture method to the private class