try modifying mbostock's graph code