more efficient widget switching