occurancesForKey method added, all tests gone ok