changed logic for scoring