add comment and code cleanup.
Better in feedback.