Fix batching for calculations.

could move case inside 
```
(fn [measurements] (case ...))
```