tf and wf computation with tests