javascript update closes issue #12