`calculate_sample()` added