Reworking exhaustive search