notes and first code for triggers