replaced parentID by parentPtr in BuildRecord structure