fix parsing of function parameters, use a lambda somewhere