added critical section comments