refactoring packTheme