adding BeforeMethod property cleanup logic