rewritten pointer shift example