add beforeAction