add support for recursive functions