added search and a new row count method