add parent child logics