Added threads variable for message relay