add beforeFilter