implementing v5.0+ 1/2
refactoring 2/2 implementing submitForm for v5.0 and above, order functions in a meaningful way