added day night functionality