redoing capture code