more cleaning and modification