reorganized the code, wrote several parsers