working namepace and class with single inheritance