first and last optimization - skip some for loop iterations -when i am sure i wont omit h1 or p - DONE