recursive graph parsing v0