improve path returns pointer