added sg url to submit function as well