add support for procs and lambdas