Respond to submit

Worked on problem 3, added rule on_submit