more tests and more bugs fixeds.