Drastic changes

adding an unweighted option.