add an onResized handler