updated to accept list of dictionaries to accommodate multiple days