optimizing grab from html