revise children and parents default id generation algorithm