add code comments
more code cleanup