more binary and ternary functions