add before of hooks