capture logic