adds the new word to the appriate table in the database