replace trigger hardcode threshold with user macro