added conditions to instrument classes and tests.