basic trigger code complete