added search method to Database