fix bugs in transductive and add junit testing for it