added headOffset