code cleanup from code review -- thank you to niroy@mirosoft.com