trying to generalize search