inheritance self while nested Class