Reduce code for checkWeight function
Calculations