add presend and postsend events