update select toggle function