add BEFORE_MEASURE event