add sunday algorithm