some source code polishing