Base code for Ucapture