added day period calc