cleanup and polishing