generic search made more generic