cleaning and tweaking