polishing the code..