smooth update upon resize.