more tests, fixed substr