moved calculate_score into new class