implement path iterator