remove .size() for performance + less getheaders calls