modified to use the form template