updated function names
added pairwise functions