wrote simpler planarization method