Making the weight calculation statements more readable