some code regarding transmitting data