withParent functionality added