Commit before adding sending function