add simple support for local functions