inheritance model defined and working