added fallback loop for multiple date formats