working single level inheritance