will now count occurences for each word, and updates timestamps properly