added storing preference for night/day