added weekday calculation