Better weight calculation