added search option to write_arffs