adding detection of base theme for sub themes