correcting weights calculation, storing scores in file