add "test suite", fix bugs found