add proper recursive search function for arbitrary nmml file