Add capture code