normalize by sum instead of logsum