added case.R