added better functionality to sender threads