Add implementation of exhaustive search