fixing occurrence search