only need one pointer subtraction function