code for calculating each pw score is ready