cleaning and simplify