Issues 1 and 2
-1) Use set_variable instead of changing hidden form field for endpoint