Implemented basic inheritance

nested inheritance is implemented