adding the before each and before all