add DialogLayerController code