implemented equals() and fixed 64-bit reading bug