changed AutoResetEvent to ManualResetEvent since it was being manually reset anyway