expanded min() to include deep iteration functionality