updated to implement proper search featuer