adding test  mode support