little refactor to use form for search