preparing for --runmode=test