dynamic MAX_PRIORITY