adjust trigger's logic