fixed div by zero in toString
implemented equals/hashcode