added semaphore to transmitter