added emit for adding child