Changes based on code review
rewrote unit test for submit function