closing child implemented