added search;improved pagination