adapt pbwaccelmax to new code changes