improved form and match controller