fixed bug in comparison code and added min_w_norm param throughout