support for simple non-lambda functions is almost working, minus type inference