initial trigger and event logic