working submit form for existing and new