updated before and after methods