added weekday/weekend code