fixed more parsing bugs, made more tests