cleaning and linking