test directly, instead of testing exit variable