adds sending functionality