some commented out optimized code