before inheritance code