added the trinary module