latest changes to support js version