added xDays function in utils.js