better algorithm, needs improvement in displaying week dates