removed matched responses as it over-complicated things
fixed sync location
clean up of code to ensure threadsafety