added Knuth Optimization