add middleware example