add before actions