added prov capture code...pretty primitive but it works