refactoring and remove+update tests