checked variants of trinary. this resolves #10