code to adjust similarities based on vector width/frequency