Function buildPart