better force-directed algorithm