added frequency tracking for numbers