move some functions into inherit call