Address the comment to remove the resetOffset() function