refine a ew sample code from original new() controller and add ewsamples,mingsave controller