Output is working on submit