use directed edges