fixed by simplifying and searching iteratively