added fix for sunday divide by 0 issue. comments added