fixed cows calculation bug and all tests are passing now