program made intelligent enough to guess which table has time series data