better directory structure, writing the parsing loop