changed pointers to parent & child to id's