updated nested search