adding js to best_path