added tests to verify contract number and virt type
fixing logic error