reworking sendthread