fixed the weekday value assignment