added txt file format
simple refactoring
changed file structure