refactoring and cleansing