Optimized code, much more efficient in space and time.