updated code, all tests for calculating mines pass