optimize select widget