added arguments to withEvent helper