updating to work with .txt file