fix toString, and add test