fixed inheritance implementation