added input for newer browsers
bit of fixing to verify output only processed once