corrected assert, added toString, added equality tests