implemented weighted scoring