add invariants, fix a bug
fix another bug in deletion
TreeMap!