use inherits for browserify compatibility
log events in test