polishing finished code