optimize inherit()