add thankyou template and clear button logic