faster searching implementation.