finding the offset of a partition