finalized most of the scoring rule, might still need minor pattern removal