added parser and tests
put code in wring branch fix