updated to do recursive search for images