update this js for options.