[Minor] extend optimization

Just skimming over the impl. :) looks pretty nice !