Now that weed is legal in California, people with old marijuana arrests can have their records cleared. The only problem is that this process takes time and money, and sets up a lot of obstacles for people who may not be able to hire an attorney or take time off work. In San Francisco, the nonprofit Code for America has created an algorithm that searches through the system for people with a marijuana conviction and fills out the paperwork for them in order to clear those convictions. Clearing records can improve public safety because critical convictions can prevent people from getting work and housing, two components that reduce the likelihood that people will commit crimes.