Add inheritance code