add before and after hooks