Added support for multiple time periods