added sema and parsing for external arguments and function references