add middleware vesion 3.0