add before and after methods to blocks