finish implementing the trigger stuff