Add before & after hooks