modifed pointer chasing