adding testmode and POST request