Added inheritance code