improve (almost works!) threads