updates the database with the word#