updated code with knob module