added beforeEach to remove stack instantiation from each test