adding a Prepare event wrapper