added in_sample