pset7: basic triggers implemented