it will extract word from database