added a bunch of #on_send stuff