Google will no longer scan student Gmail accounts for advertising purposes, the company said today.

The student accounts are part of the company’s Google Apps for Education, a free service that includes a full office-focused suite of software that’s used by over 30 million students and teachers.

Google previously scanned the inboxes of these student accounts to collect data that it could use for ad targeting as well as for the company’s other advertising products. However, Google hasn’t actually placed any advertising within its education products, including the student Gmail accounts.

The move comes after a California lawsuit criticized Google for collecting the data, claiming the company was in violation of privacy laws that protect against sharing sensitive education records.