update the theme and some logic