made receiver threadsafe