change api to submit method