refactor submit
updated