need to parse ast for defined funcs