add wieght calculation