first version of parsing implemented