It doesn't actually make a difference, but I would change the index on all `test_data` references to `[0]` instead of `[-1]`.  Just reading the code without reference to the original version, one would be confused about why `[-1]` was used.