Events have to be declared before use