added check for theme