Digit-occurences

Edited code slightly to get rid of not relevant code