implemented the parsing