added search and improved form functionality