changed trigger and get trivial function