refractoring and cleaning