remove duplicate handling from ui, add handling in submit callback.