modularize capture method