code cleanup and add comment