js figure finished