patch by Skywing: made existing eventpair code more efficient and added support for...