Added duration pulling
add prevent default to submit function