start adapting circle packing to reuse js