Copied original code, for reference; created another implementation to test another type of improvement.