added some more debug code to see where the offset starts and ends