change generate case method