added codegen for record returns and arguments