Create inherits function.