set slider value method