run setup and tear down functions in relation to parent