added first occurence function