Adding comment and also applying performance refactoring by Michael Westbay.