now auto selecting start idx and goal idx based on start and goal location