now supports a variable number of days