moved trigger check