correctly set function type for member var fields