implemented a first cut at triggers