polishing, removing dead code