added queue to pulse output to ensure only one thread sends pulses