added sending functionality (except streams)