added weekday calculation etc

added weekday calculation etc