adding code to update parent when a child is created