moved score calculation into sets