complete the work that reading word from files