added Sunday algorithm