populated some the ast to json functions