bivariate functions + test