more tests, more bug fixed