Add beforeEach function