make valon searching code smarter