add before and after task