make sum work both as a class and as an instance method
fix error on dist2_to_box
document dist2_to_box and sum methods
prepare for release