working on infinite search bug