Modified for search short path