adding template submit handler snippet