first version of the working parser