moved disabling/enabling of triggers into their own loop