Since the 1990s, the number of Americans with a criminal history has dramatically risen, according to the Brennan Center for Justice. In 2015, almost one-third of the adult working age population had some sort of criminal record. Researchers estimate that by age 23, nearly one in three Americans will have been arrested.

More than likely, you probably have run across job candidates with a criminal past. Do you have policies in place that help hiring managers make appropriate selection decisions about such candidates? Or is their criminal record front and center, even it occurred many years ago?

If the latter, you may wind up in court, charged with race discrimination. The U.S. Equal Employment Opportunity Commission’s guidelines restrict employers from basing most employment decisions solely on criminal histories, which may violate the prohibition against employment discrimination under Title VII of the Civil Rights Act of 1964.

Consider these three cases. In 2012, Pepsi Beverages agreed to pay a $3.13 million fine and provide job offers and training to resolve a charge of race discrimination. The EEOC’s investigation found that the criminal background check policy used by Pepsi discriminated against African Americans. Apparently, more than 300 African Americans were adversely affected when Pepsi applied a criminal background check policy that barred applicants who had been arrested but not convicted or arrested or convicted of minor offenses that were not relevant to the job.

Since then, other cases involved discount retailer Dollar General and a U.S. division of German automaker BMW.  Instead of assessing applicants’ skills and qualifications and the relationship between past crimes and jobs being applied for, hiring decisions were based on criminal background checks alone. The EEOC charged that the hiring policies at both companies discriminated against black applicants, violating Title VII of the 1964 Civil Rights Act. To settle the federal lawsuits, Dollar General paid $32,500 in fines while BMW was penalized $1.6 million.

Refusing to hire job candidates solely based on their criminal record – especially those who committed crimes long ago – may not only be illegal but limits your company’s access to a large chunk of the applicant pool, says DiversityInc. Instead, create relevant matrixes that identify which convictions are relevant to which jobs. For example, applicants convicted of drunk driving should not be considered for school bus driver positions. Those who’ve committed violent crimes should be excluded from jobs that cater to vulnerable populations like children or seniors.

The National Workrights Institute offers a free guide to help companies create their own customized matrix and additional assistance, if needed. Contact Lewis Maltby, the organization’s president, at lmaltby@workrights.org

“A matrix is a match process that can help you find which applicants with records can be productive employees for your company,” says Maltby, a former corporate HR director.

Still, these matrixes are simply tools to aid recruiters or hiring managers in the decision-making process. In the end, selecting new hires involves many factors and common sense. While some employers consider criminal checks a necessity – in 2012, 14 percent conducted such checks, according to the Society for Human Resource Management – good judgment also needs to be exercised to stay on the right side of the law and fill much needed positions with the best qualified and most appropriate candidates.