add trifbank and dft methods with tests