fix the bugs and add path analyze