set background switch based on preferences