error is O(log(n)) now
support batched transformations