simplify using js1.6 array functions rather than a loop (post-submit)