adding the before and after methods