finalized test mode (added --test-mode parameter)
fixed url ---extra parameter