Logarithmic brain works, all tests are looking very good. Race condition fixed