added submit function, kind of stuck on this