added graph algo's