bug with parsing text file fixed