decorator: register event with its handler