working on a memory leak

searching a whole lot of times isn't good for memory atm.