Added smarter searching