pretty much done except for parser integration