added submit function