Using new format to register to window events