add window events for resize, change