added beforeAction documentation