Added saving on submitting the form