added the rest of the parsing implementation