calculating movie bacon distance for graph too