implement support for three children encoding
implement support for three children encoding