add force directed code