change db and add criteria search