added occurrences function which is quite handy sometimes