searching  by name and ref instead of id